﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using TV.BUS;
using TV.Common;
using TV.ENT;
using TV.Models;

namespace TV.Areas.TVCHANE.Controllers
{
    public class YouTubeController : Controller
    {
        //
        // GET: /TVCHANE/YouTube/
        int pageSize = 20;
        public ActionResult Index()
        {
            return View();
        }
        public PartialViewResult getChange()
        {
            busYouTube busY = new busYouTube();
            List<entYouTube> lst = new List<entYouTube>();
            lst = busY.getAll(1);
            return PartialView(lst);
        }
        public PartialViewResult getAllChange()
        {
            PagingInfoModel page = new PagingInfoModel()
            {
                CurrentPage = Utils.getIntQuery("page") == 0 ? 1 : Utils.getIntQuery("page"),
                recordPerPage = pageSize
            };
            busYouTube busY = new busYouTube();
            List<entYouTube> lst = new List<entYouTube>();
            lst = busY.getAll(1, ref  page);
            return PartialView(lst);
        }
        public PartialViewResult getYouTube()
        {
            PagingInfoModel page = new PagingInfoModel()
            {
                CurrentPage = Utils.getIntQuery("page") == 0 ? 1 : Utils.getIntQuery("page"),
                recordPerPage = pageSize
            };
            busYouTube busY = new busYouTube();
            List<entYouTube> lst = new List<entYouTube>();
            lst = busY.getAll(2,ref  page);
            return PartialView(lst);
        }
       

    }
}
